home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Scope / Scope Disk #058 (199x)(Scope PD)(US)[WB].zip / Scope Disk #058 (199x)(Scope PD)(US)[WB].adf / B1Subs / ILBM.normal < prev    next >
Text File  |  1989-01-24  |  1KB  |  55 lines

  1.  
  2. END
  3. '** To set up the Screen Load/Save
  4. '** stuff at the start of your program.
  5.  
  6.   GOSUB InitILBM
  7.  
  8. '** The picture's name can be INPUT
  9. '** or by using the following line
  10.  
  11.   FileName$="Your.pic"
  12.  
  13. '** Then use either of the following
  14. '** lines whenever you need to load
  15. '** or save a screen.
  16.  
  17.   GOSUB ILBMloading  
  18.   
  19.   GOSUB ILBMsaving
  20.   
  21. '** The above lines load and save screens
  22. '** but to draw, type or access those screens
  23. '** you must open a SCREEN and WINDOW with
  24. '** the matching resolution and number
  25. '** of bit-planes.  
  26.  
  27. REM -     Assembly Routines 
  28. REM -   by Charles VASSALLO  - March 88
  29. REM - (33 route des Traouieros, 22730 Tregastel - France)
  30.   
  31. InitILBM:
  32.    DIM Code%(1220)    
  33.    OPEN "ILBM.code" FOR INPUT AS #1 
  34.    I=0  
  35.    WHILE NOT EOF(1)
  36.      INPUT#1,Code%(I) : I=I+1 
  37.    WEND
  38.    CLOSE #1
  39.    OpenFlag=0   
  40.   RETURN
  41.  
  42. ILBMloading:
  43.    file0$=FileName$+CHR$(0)
  44.    ILBMload&=VARPTR(Code%(0))          
  45.    CALL ILBMload&(SADD(file0$))       
  46.   RETURN
  47.        
  48. ILBMsaving:
  49.    file0$=FileName$+CHR$(0)
  50.    ILBMsave&=VARPTR(Code%(0))+1378       
  51.    CALL ILBMsave&(SADD(file0$))        
  52.   RETURN     
  53.  
  54. Ult: REM - OpenFlag=PEEK(2297+VARPTR(code%(0)))  can be tested in case of error
  55.